﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using Vit.Web;
using Vit.Web.Models;

namespace Vit.Mvc.Models
{
    public partial class WebPage : IPage
    {
        #region IPage Members


        IWebSite IPage.WebSite
        {
            get
            {
                return this.WebSite;
            }
        }

        IEnumerable<IPageModule> IPage.PageModules
        {
            get { return this.PageModules; }
        }

        EditMode IPage.Mode
        {
            get
            {
                return WebUnity.Current.PortalService.Run(p => p.GetCurrentUserMode(), p => p != null);
            }
        }

        #endregion

        #region IKey Members

        public object Key
        {
            get
            {
                return this.PageID;
            }
            set
            {
                this.PageID = (Guid)value;
            }
        }

        #endregion
    }
}
